<template>
	<div class="components-container">
        <div class="header-form">
            <div class="layui-inline">
                <label class="layui-form-label">名称</label>
                <div class="layui-input-inline">
                  <el-input v-model="selectData.NameLike" placeholder="输入名称"></el-input>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">类别</label>
                <div class="layui-input-inline">
                  <el-select v-model="selectData.TypeEquals" placeholder="请选择类别">
                      <el-option v-for="item in UnttypeOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                  </el-select>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">统计地址</label>
                <div class="layui-input-inline">
                  <el-cascader :options="UntyuseroupOptions" v-model="carryArea" filterable :show-all-levels="false" change-on-select>
                  </el-cascader>
                </div>
            </div>
            <el-button type="primary" @click="btnSearch" :disabled="downloadLoading" :loading="this.$store.state.isloading">搜索</el-button>
            <el-button :disabled="this.$store.state.isloading || downloadLoading">重置</el-button>
        </div>
        <div style="margin-top:10px;">
          <ul class="toolList">
            <li v-if="btnShow(item.BTNVALUE)" v-for="(item, index) in $store.state.btnListCommon" @click="operate(item.BTNVALUE)">
              <el-button type="primary" :disabled="$store.state.isloading || downloadLoading" :value="item.BTNSHOWNAME" v-text="item.BTNSHOWNAME"></el-button>
            </li>
            <li>
            <el-button type="primary" :disabled="this.$store.state.isloading">导出Excel</el-button>
            </li>
          </ul>
        </div>
        <dataTable :height="height"  :headList="headList" :isIndex="true" :dataList="dataList" :pageOrder="pageOrder" @pageChange="pageChange" @selectRow="selectRow" :hiddenPageOrder="false" :hiddenColumn="hiddenColumn"></dataTable>
	</div>
</template>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/common.scss";
.el-button + .el-button {
  margin-left: 0;
}
.btn {
  text-align: center;
}
</style>
<script>
import dataTable from "@/components/Table/DataTable";
import apiBase from "@/api/apiBase.js";
import { formatDate} from "@/utils/date.js";
import { manage } from "@/mixins/managePage.js";
import { PRINT } from "@/components/Pdf/PDF.js";
const EXPORT = "打印";
export default {
  name: "unitManage",
  mixins: [manage],
  data() {
    return {
      selectData: {
      },
      downloadLoading:false,
      OutDataExcel:[],
      message: null,
      height: "620",  
      sweetModalWidth: 80,
      sweetModalMaxWidth: 1000,
      hiddenColumn: true,
      carryArea:[],
      UnttypeOptions:[],
      UntyuseroupOptions: [],
    };
  },
  methods: {
    
    
   
    
  
    },
  mounted() {
  },
  components: {
    dataTable,
  },
 
  created() {
   this.headList = [{
        "ColumnKey": "q",
        "ColumnName": "状态",
        "ColumnOrder": "q",
        "ColumnAlign": "center",
        "ColumnWidth": 90
    }, {
        "ColumnKey": "w",
        "ColumnName": "业务编号",
        "ColumnOrder": "w",
        "ColumnAlign": "center",
        "ColumnWidth": 150
    }, {
        "ColumnKey": "e",
        "ColumnName": "逝者姓名",
        "ColumnOrder": "e",
        "ColumnAlign": "center",
        "ColumnWidth": 120
    }, {
        "ColumnKey": "y",
        "ColumnName": "联系人",
        "ColumnOrder": "y",
        "ColumnAlign": "center",
        "ColumnWidth": 120
    }, {
        "ColumnKey": "u",
        "ColumnName": "联系电话",
        "ColumnOrder": "u",
        "ColumnAlign": "center",
        "ColumnWidth": 200
    }, {
        "ColumnKey": "i",
        "ColumnName": "逝者详细住址",
        "ColumnOrder": "i",
        "ColumnAlign": "center",
    },{
        "ColumnKey": "z",
        "ColumnName": "逝者状态",
        "ColumnOrder": "z",
        "ColumnAlign": "center",
    },{
        "ColumnKey": "x",
        "ColumnName": "火化日期",
        "ColumnOrder": "x",
        "ColumnAlign": "center",
    }]
    this.dataList = [
        {
        "q": "填报中",
        "w": "2019041200001",
        "e": "张三",
        "y": "张四",
        "u": "123456789",
        "i": "浙江省杭州市拱墅区",
        "z": "火化中",
        "x": "2019-05-28"
    },
    {
        "q": "填报中",
        "w": "2019041200001",
        "e": "李四",
        "y": "李武",
        "u": "45654546",
        "i": "浙江省杭州市余杭区",
        "z": "火化中",
        "x": "2019-05-20"
    },
    {
        "q": "填报中",
        "w": "2019041200001",
        "e": "李四",
        "y": "李武",
        "u": "165656511",
        "i": "浙江省杭州市西湖区",
        "z": "火化中",
        "x": "2019-04-28"
    },
    {
        "q": "填报中",
        "w": "2019041200001",
        "e": "王五",
        "y": "王六",
        "u": "654949561",
        "i": "浙江省杭州市滨江区",
        "z": "火化中",
        "x": "2019-06-28"
    }
    ]
  }
};
</script>